package com.jxtti.utils;

public class ExceptionUtil {
	/**
	 * ��ȡԭʼ�쳣
	 * 
	 * @param e
	 * @return
	 */
	public static String createStackTrackMessage(Exception e) {
		StringBuffer messsage = new StringBuffer();
		if (e != null) {
			messsage.append(e.getClass()).append(": ").append(e.getMessage())
					.append("\n");
			StackTraceElement[] elements = e.getStackTrace();
			for (StackTraceElement stackTraceElement : elements) {
				messsage.append("\t").append(stackTraceElement.toString())
						.append("\n");
			}
		}
		return messsage.toString();
	}
}
